<html>

<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <title>信息设置</title>
    <meta name="viewport" content="initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="stylesheet" type="text/css" href="${staticpath}/front/dist/css/lib/sm.css">
    <link rel="stylesheet" type="text/css" href="${staticpath}/front/dist/css/lib/idangerous.swiper.css">
    <link rel="stylesheet" type="text/css" href="${staticpath}/front/dist/css/base.css">
    <link rel="stylesheet" href="${staticpath}/front/dist/css/themes.css">
    <link rel="stylesheet" type="text/css" href="${staticpath}/common/webUpload/webuploader.css">
    <style>
        .add{
            max-width: 6rem;
            height: 1.5rem;
            line-height: 1.5rem;
            margin: auto;
            text-align: center;
        }
        .webuploader-pick {
            position: relative;
            display: block;
            cursor: pointer;
            padding: 0;
            text-align: left;
            background-color: transparent;
            border-radius: 0;}
        .cover-pic{
            height: 130px;
            margin-top: 0.5rem;
            width: 96%;
        }
    </style>
</head>
<body>

<div class="page-group">
    <div class="page page-current">
        <header class="bar bar-nav">
            <a onclick="back()" class="icon icon-left pull-left"></a>
            <h1 class="title">信息设置</h1>
            <span class="pull-right title-save cell-right">保存</span>
        </header>
        <ul id="filePicker">
            <li class="inf-pic flex-box">
                <div class="inf-text cell-main cell-left">店铺头像</div>
                <img src="${staticpath}/front/dist/images/shop-ico.png" alt="" class="inf-icon" id="icon">
                <img src="${staticpath}/front/dist/images/arrowRight.png" alt="" class="inf-arrow cell-right">
            </li>
        </ul>
        <div class="underline"></div>
        <li class="inf-items flex-box">
            <div class="inf-text cell-left ">店铺名称</div>
            <input type="text" class="inf-detail cell-main shopname cell-right" placeholder="请输入店铺名称">
        </li>
        <div class="underline"></div>
        <li class="inf-items flex-box">
            <div class="inf-text cell-left">店铺介绍</div>
            <input type="text" class="inf-detail cell-main intro cell-right" placeholder="请输入店铺介绍">
        </li>
        <div class="shopcover ">
            店铺封面
            <div id="cover">
                <ul class="up">
                    <div class="upload ">
                        <li class="add flexbox">
                            <img src="${staticpath}/front/dist/images/add.png" alt="" class="cover-ico">
                            <span class="cover-text cell-main">上传封面</span></li>
                    </div></div></ul>
        </div>
    </div>
</div>
<script type='text/javascript' src='${staticpath}/front/dist/js/lib/zepto.js' charset='utf-8'></script>
<script type='text/javascript' src='${staticpath}/front/dist/js/lib/idangerous.swiper.min.js' charset='utf-8'></script>
<script>
    $.config = {
        router: false
    }
</script>
<script type='text/javascript' src='${staticpath}/front/dist/js/lib/sm.js' charset='utf-8'></script>
<script type='text/javascript' src='${staticpath}/front/dist/js/seller/storeSet.js' charset='utf-8'></script>
<script type='text/javascript' src='${staticpath}/common/js/jquery-1.8.1.min.js' charset='utf-8'></script>
<script>jQuery.noConflict();</script>
<script type='text/javascript' src='${staticpath}/common/webUpload/webuploader.min.js' charset='utf-8'></script>

<script>
    //上传图片
    var uploader=WebUploader.create({
        auto:true,
        swf:'${staticpath}/common/ueditor/third-party/webuploader/Uploader.swf',
        server:'${basepath}/rest/front/ued/config?action=uploadimage',
        pick:'#filePicker',
        accept:{
            title:'Images',
            extensions:'gif,jpg,jpeg,bmp,png',
            mineTypes:'image/gif,image/jpg,image/jpeg,image/bmp,image/png,'
        }
    });
    uploader.on('uploadSuccess', function (file, response) {
        uploader.removeFile(file);
        var headImg=response.url;
        $("#icon").attr('src',headImg);
    });
    //上传封面
    var uploader1=WebUploader.create({
        auto:true,
        swf:'${staticpath}/common/ueditor/third-party/webuploader/Uploader.swf',
        server:'${basepath}/rest/front/ued/config?action=uploadimage',
        pick:'#cover',
        accept:{
            title:'Images',
            extensions:'gif,jpg,jpeg,bmp,png',
            mineTypes:'image/gif,image/jpg,image/jpeg,image/bmp,image/png,'
        }
    });
    uploader1.on('uploadSuccess', function (file, response) {
        uploader1.removeFile(file);
        var headImg1=response.url;
        var imgHtml = '<img class="cover-pic" src="' + headImg1 + '">';
        $(".up").empty().html(imgHtml);

    });
    $.init();
</script>
</body>

</html>